class runEnum {
    public static void main(String[] args) {
        EnumColor.getColor("red1");
        // System.out.println(EnumColor.GREEN.getColor());
    }
}

enum EnumColor {
    RED("red1"),
    GREEN("green2"),
    BLUE("blue3");

    private final String color;

    EnumColor(String color) {
        this.color = color;
    }

    public String getColor() {
        return color;
    }

    public static String getColor(String color) {
        for (EnumColor c : values()) {
            // 单体枚举本身
            System.out.println(c);
            // 单体枚举本身的KEY
            System.out.println(c.name());
            
            // 单体枚举的VALUE
            System.out.println(c.color);
            System.out.println(c.getColor());
            System.out.println(c.color.equals(c.getColor()));
        }
        return "001";
    }
}


